package com.myfum.wingplayer.entity
{
	import flash.filesystem.File;
	
	import mx.collections.ArrayCollection;
	import mx.collections.Sort;
	import mx.collections.SortField;

	[Bindable]
	public class ScheduleLineData extends Serializer
	{
		public function ScheduleLineData(file:File = null)
		{
			_file = file;
		}
		
		/**
		 * day number, from 0 to 6, means from sunday to saturday
		 */		
		public var day:int;
		public var arrayCollection:ArrayCollection = new ArrayCollection();
		
		public function serialize():void{
			if(file){
				_serialize(file);
			}
			sort();
		}
		
		public function sort():void{
			var sf:SortField = new SortField('startTime');
			var s:Sort = new Sort();
			s.fields = [sf];
			arrayCollection.sort = s;
			arrayCollection.refresh();
		}
	}
}